package org.xxmi.simple.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xxmi.simple.model.SysUser;
import org.xxmi.simple.service.UserService;

@RestController
@RequestMapping("/")
public class DemoController {

    @Autowired
    private UserService userService;

    @GetMapping("demo")
    public String demo() {
        return "ok";
    }

    @GetMapping("/user")
    public SysUser getUser(){
        return userService.getUser();
    }
}
